$def with(settings)

$var title: $_(u'SIP Plugin Manager')
$var page: plugins


<script>

    // Initialize behaviors
    jQuery(document).ready(function() {

        jQuery("button#cSubmit").click(function () {
           jQuery("#btnId").val("upd");
           jQuery("#pluginForm").submit();
        });

        jQuery("button#cDelete").click( function() {
            jQuery("#btnId").val("del");
            jQuery("#pluginForm").submit();
        }
            );

            jQuery("button#cCancel").click(function(){
                window.location= "/";
        });

        jQuery("button#browsePlugins").click(function(){
            window.location= "/browse-plugins";
        });

        jQuery("button#writePlugins").click(function (){
            window.open("https://github.com/Dan-in-CA/SIP_plugins/wiki/introduction", "_blank");
        });
    });

</script>

<div id="plugin">
    <div class="title">$_(u'Installed Plugins')
    <button class="execute" id="browsePlugins" type="button" >$_(u'Browse More Plugins')</button>
    <button class="execute" id="writePlugins" type="button" >$_(u'Roll Your Own')</button></div>
    <form id="pluginForm" action="/upd-plugins" method="get">
        <table class="optionList" id="installedList">
            <thead>
            <tr>
                <th class="pluginName">$_(u'Name')</th>
                <th class="pluginEnabled">$_(u'Enabled')&nbsp;&nbsp;&nbsp;</th>
                <th class="pluginDelete">$_(u'Uninstall?')</th>
            </tr>
            </thead>
            
            <tbody class="shaded">
            $ names = list(settings.keys())
            $names.sort()
            $for n in names:
                <tr>
                    <td class="pluginName">${n.split('.')[0]}</td>
                    <td class="stationShow">
                        <label class="notlectable"><input type="checkbox" name="${n}" ${"checked" if settings[n] else ""} ></label>
                    </td>
                    <td class="stationShow">
                        <label class="notlectable"><input type="checkbox" name="del-${n}"></label>
                    </td>
                </tr>
            </tbody>    
        </table>
        <input type="hidden" name="btnId" id="btnId">
    </form>
</div>
<div><b>$_(u'CAUTION:')</b> $_(u'Clicking UPDATE or UNINSTALL will restart the software and stop any running programs.')</div>
<div class="controls">
    <button id="cSubmit" class="submit"><b>$_(u'Update Enabled')</b></button>
    <button id="cDelete" class="submit danger"><b>$_(u'Uninstall')</b></button>
    <button id="cCancel" class="cancel danger">$_(u'Cancel')</button>
</div>
